package test7;

import java.util.LinkedList;
import java.util.List;

class Stack implements IntegerStack{
    List<Character> stack = new LinkedList<Character>();
    @Override
    public void push(Character item) {
        stack.add(item);
    }

    @Override
    public void pop() {
        stack.remove(stack.size()-1);
    }

    @Override
    public Character peek() {
        return stack.get(stack.size()-1);
    }

    @Override
    public boolean empty() {
        return stack.isEmpty();
    }

    @Override
    public int size() {
        return stack.size();
    }

}